Explainable artificial intelligence framework for electrocardiography analysis

ABSTRACT

There is included an apparatus and system including an intra-heartbeat (HB) extraction code configured to extract intra-HB features from electrocardiography (ECG) signals, and an inter-HB extraction code configured to extract inter-HB features from the ECG signals, and at least one attention mechanism code configured to control at least one of the intra-HB extraction code and inter-HB extraction code based on at least one attention mechanism.

BACKGROUND 1. Field

The disclosed subject matter relates to an explainable artificialintelligence framework designed, for example, for electrocardiography(ECG) signal data analysis which can be applied widely in ECGclassification, computer-aided diagnosis, bed-side alarms and patientECG monitoring.

2. Description of Related Art

Related art is incapable of providing a comprehensive ECG diagnosis andanalysis system even though ECG exams are among the most common medicalprocedures to help doctors diagnose many heart diseases, includingatrial fibrillation, myocardial infarction, and acute coronary syndrome(ACS).

Annually, around 300 million ECGs are recorded (NPL 1). Conventionalapproaches for ECG analysis tend to use digital signal processingalgorithms, such as wavelet transformations (NPL 2 and 3), to computefeatures from ECG signals. However, such approaches are notcomprehensive, and thus, using those features alone is insufficient todistinguish between multiple types of heart arrhythmias. As such, therehas been an attempt to address such technical problem by adoption ofdeep neural networks, such as convolutional neural networks (CNN) (NPL4) and recurrent neural networks (RNN) in attempt to achieve goodaccuracy for multi-class classification task based on ECG signals.

-   NPL 1: Hedén, B., Ohlsson, M., Holst, H., Mjöman, M., Rittner, R.,    Pahlm, O., . . . & Edenbrandt, L. (1996). Detection of frequently    overlooked electrocardiographic lead reversals using artificial    neural networks. American Journal of Cardiology, 78(5), 600-604.-   NPL 2: Li, C., Zheng, C., & Tai, C. (1995). Detection of ECG    characteristic points using wavelet transforms. IEEE Transactions on    biomedical Engineering, 42(1), 21-28.-   NPL 3: Martínez, J. P., Almeida, R., Olmos, S., Rocha, A. P., &    Laguna, P. (2004). A wavelet-based ECG delineator: evaluation on    standard databases. IEEE transactions on biomedical engineering,    51(4), 570-581.-   NPL 4: Rajpurkar, P., Hannun, A. Y., Haghpanahi, M., Bourn, C., &    Ng, A. Y. (2017). Cardiologist-Level Arrhythmia Detection with    Convolutional Neural Networks. arXiv.org.

Although existing approaches for cardiologic tasks have attemptedpromising results in terms of accuracy, there are still severalchallenges and shortages. For example, such machine learning and deeplearning lack provision of an ability for explanation by the doctors,technicians and researchers. For example, the researcher, as well as thecardiologists, cannot directly using the models to explain where and howthe model makes some final decision. Further, such systems generallyextract intra- and inter-heartbeat features from two separateddimensions thereby making it technically difficult to extract botheasily with existing single models.

In short, models employed by existing approaches break the typicaldiagnosis procedures which cardiologists use in real world by their lackof provision of ability for explanation by which comprehensive decisionscannot be made due to unmanageable complexity, and a technical solutionto these problems is desired by which to achieve multiple data analysistasks with multiple sets of ECG features.

SUMMARY

There is presently presented an explainable artificial intelligenceframework designed for electrocardiography (ECG) signal data analysisand which can be applied widely in ECG classification, computer-aideddiagnosis, bed-side alarms and patient ECG monitoring and may locate andpattern how a set of ECG signals are used to diagnosis an abnormalsymptoms or a cardiac disease.

That is, there is provided a new artificial intelligence framework forECG analysis, which accepts ECG signals as inputs and provides possibleanalysis outcomes as well as the reasons of decision.

According to exemplary embodiments, there is an apparatus and a methodin which there is at least one memory, configured to store computerprogram code, at least one hardware processor, configured to access saidcomputer program code and operate as instructed by said computer programcode. Said computer program code including an intra-heartbeat (HB)extraction module code configured to extract intra-HB features fromelectrocardiography (ECG) signals, an inter-HB extraction module codeconfigured to extract inter-HB features from the ECG signals, and atleast one attention mechanism code configured to control at least one ofthe intra-HB extraction module code and inter-HB extraction module codebased on at least one attention mechanism.

According to exemplary embodiments, the apparatus and method furtherinclude computer program code that includes extraction module pool codeconfigured to extract at least one extraction model from an extractionmodule pool and apply the at least one extraction model to extraction ofat least one of the intra-HB features and the inter-HB features by acorresponding one of the intra-HB extraction module code and theinter-HB extraction module code.

According to exemplary embodiments, the apparatus and method furtherinclude computer program code wherein the intra-HB extraction modulecode is further configured to extract the intra-HB features in parallelwith extraction of the inter-HB features by the inter-HB extractionmodule code.

According to exemplary embodiments, the apparatus and method furtherinclude computer program code that includes a second inter-HB extractionmodule code configured to extract second inter-HB features from the ECGsignals in parallel with both of the extraction of the intra-HB featuresby the intra-HB extraction module code and the extraction of theinter-HB features by the inter-HB extraction module code.

According to exemplary embodiments, the apparatus and method furtherinclude computer program code that includes the at least one attentionmechanism code is configured to control the intra-HB extraction modulecode based on the at least one attention mechanism, and wherein thecomputer program code further includes a second attention mechanism codeconfigured to control the inter-HB extraction module code based on asecond attention mechanism, and a third attention mechanism codeconfigured to control the second inter-HB extraction module code basedon a third attention mechanism.

According to exemplary embodiments, the apparatus and method furtherinclude computer program code that includes ECG analysis module codeconfigured to obtain and statistically process the intra-HB features andthe inter-HB features.

According to exemplary embodiments, the apparatus and method furtherinclude computer program code that includes task specific module poolcode configured to extract at least one task specific model from a taskspecific module pool and apply the at least one task specific model tostatistically process the intra-HB features and the inter-HB features bythe task specific module pool code.

According to exemplary embodiments, the apparatus and method furtherinclude the ECG analysis module code that is further configured tooutput at least one of a classification result, an outlier alarm and apredicted diagnosis based on a result of statistically processing theintra-HB features and the inter-HB features.

According to exemplary embodiments, the apparatus and method furtherinclude statistically processing the intra-HB features and the inter-HBfeatures by at least one of batch normalization and instancenormalization based on the at least one task specific model.

According to exemplary embodiments, the apparatus and method furtherinclude computer program code that includes feedback link codeconfigured to feedback an output of the ECG analysis module code to theat least one attention mechanism, and the at least one attentionmechanism code is configured to update the attention mechanism based onthe output.

BRIEF DESCRIPTION OF THE DRAWINGS

Further features, nature, and various advantages of the disclosedsubject matter will be more apparent from the following detaileddescription and the accompanying drawings in which:

FIG. 1 is a schematic illustration of a simplified block diagram of asystem in accordance with an embodiment.

FIG. 2 is a schematic illustration of a simplified flow chart of acommunication system in accordance with an embodiment.

FIG. 3 is a schematic illustration of a simplified flow chart of acommunication system in accordance with an embodiment.

FIG. 4 is a schematic illustration of a simplified block diagram of asystem in accordance with an embodiment.

FIG. 5 is a schematic illustration of a simplified flow chart of acommunication system in accordance with an embodiment.

DETAILED DESCRIPTION

FIG. 1 is an illustration of a simplified block diagram of a system 100in accordance with an embodiment.

There is an input controller 101 configured to receive ECG signal data,either input from a network or from plural electrodes obtainingheartbeat electrical signals from a body. In attempting to analyze aheartbeat (HB) and make some diagnosis, two levels or types of signalpatterns may be considered. First types of signal patterns areintra-heartbeat patterns which capture signal changes with singleheartbeats, and second types of signal patterns are inter-heartbeatpatterns by which measurements of shape alternations among allheartbeats may be obtained.

A standard ECG report contains signals from a number of different leads,such as 12 different leads, which require a number of electrodes, suchas 10 electrodes, in contact with the body. These electrodes are locatedon different specific locations of body. With such geometric placements,ECG can measure and trace electrophysiological patterns during eachheartbeat. Further, the electrical changes collected from electrodes areused to derive waveform signals on multiple axes.

When diagnosing with ECG signal, two levels of signal patterns willcardiologists and doctors consider: one is intra-heartbeat pattern whichcaptures the signal changes with single heartbeats; the other isinter-heartbeat pattern which measures shape alternations among allheartbeat. The input controller 101 may receive such signal patterns andprovide those patterns to various modules.

There are provided various feature extraction modules, such as intra-HBextraction module 102, and one or more inter-HB extraction modules 103and 104, by which input ECG signal data may be analyzed and high-leveldata features may be extracted.

Machine learning attention mechanisms are attached to each extractionmodules 102, 103 and 104 as illustrated in FIG. 1, and serve to focusthe extraction modules. For example, the focus may be to track certainfeatures of the ECG signal data in greater resolution while alsotracking similar features in lower resolution, and such tracking may beadjust that focus over time and based on use of one or more models, fromthe pool 105, and results of analyzing the ECG signal data.

Further, the ECG analysis module 107 may result results of extractionand attention based analysis from the extraction modules 102, 103 and104, and the ECG analysis module 107 will finish specific tasks withsuch results by drawing one or more models from the task specific modulepool 106 and by performing clustering, classification, prediction, etc.,and then achieve the final goal of the framework. For example, ECGclassification, computer-aided diagnosis, bed-side alarms and patientECG monitoring may be output to a display or to a network to alert auser, such as a doctor, technician or researcher.

The task specific module pool 106 is a collection of different modelsserved for various ECG related tasks. For instance, several statisticalprocess control algorithms for ECG monitoring and alarming, severalpredictive models and classifier models for computer-aided diagnosis,and some statistical tools for general pathological status calculation.Depending on the goal of using the framework, the ECG analysis module107 will deploy one or more appropriate tools from the task specificmodule pool 106 to finish an end-to-end framework and achieve the finalgoal.

FIG. 2 illustrates a flowchart 200 regarding obtaining the ECG signaldata at element 101 and analyzing those ECG signal data at theextraction modules 102, 103 and 104 with their attention based learningand models from the extraction module pool 105.

At S201, ECG signal data is received and distributed to ones of theextraction modules 102, 103 and 104.

At S202A, the extraction module 102 accepts pre-processed data asinputs, and generates intra-HB feature vectors as outputs.

Model-wise, at S203A, the extraction module 102 receives one or moremodels from the extraction module pool 105, and such models includeconventional machine learning approaches such as support vector machine(SVM), random forests (RF), or deep learning models such as CNN and RNN.The parameters for each module are trained separately. In thisintervention, models, based on the features they extracted, can becategorized into two type: intra-HB feature extraction modules andinter-HB feature extraction modules, and in the case of the extractionmodule 102, intra-HB features may be extracted

As shown in FIG. 1, an attention mechanism is attached to the extractionmodule 102 and, at S204A, that attention mechanism operates to modeldependencies and relationships both between input and output data aswell as also between the output data. For instance, by various modelswith the attachment of an attention mechanism, if an ECG signal wasconsidered to act as a diagnosis for atrial premature complexes, suchmodels and attention mechanism may also show a strong indicator that thesame signal would not be a diagnosis for a sinus rhythm at a same time.Additionally, such attention mechanism as applied to the extractionmodule 102 may also, if a signal shows unchanged pattern among allheartbeats, then show that such signal has high probability to lead to adiagnosis of normal ECG as well as a sinus rhythm. Such dependencies canbe modeled as an RNN model, a Bayesian network, etc. and may be used tooutput illustration or alarm to a user, such as a doctor, technician orresearcher, some as framework how to make decisions based on both inputand output information.

At S205A, the process proceeds to post-processing described further withrespect to the ECG analysis module 105 and FIG. 3.

At S202B, any of the extraction modules 103 and 104 accept respectiveones of pre-processed data as inputs, and generates inter-HB featurevectors as respective outputs.

Model-wise, at S203B, any of the extraction modules 103 and 104 receivesone or more models from the extraction module pool 105, and such modelsinclude conventional machine learning approaches such as support vectormachine (SVM), random forests (RF), or deep learning models such as CNNand RNN as described above.

As shown in FIG. 1, respective attention mechanisms are attached to theextraction modules 103 and 104 and, at S204B, such attention mechanismsoperate to model dependencies and relationships both between input andoutput data as well as also between the output data as described abovebut with respect to the inter-HB data. Such dependencies from thesemodules 103 and 104 with their attention mechanisms can also be modeledas an RNN model, a Bayesian network, etc. and may be used to outputillustration or alarm to a user, such as a doctor, technician orresearcher, some as framework how to make decisions based on both inputand output information.

At S205B, the process proceeds to post-processing described further withrespect to the ECG analysis module 105 and FIG. 3.

FIG. 3 illustrates a flowchart 300 regarding post processing, and atS301, extracted features, as described with respect to FIG. 2, arecollected from multiple of the modules 102, 103 and 104 with multipletypes of inputs, and these collected features are post-processed bybatch normalization, instance normalization, etc. to provide a finalfeature set for analysis.

For example, such post-processing involves the ECG analysis module 107obtaining one or more models from the task specific module pool 105 andS302, and upon obtaining the one or more modules, the ECG analysismodule 107 accepts extracted features and produces final outcomes suchas any of classification results at S303A, outlier alarms at S304B, andprovides predicted diagnosis at S303C for example.

As such, the presently presented training framework is designed as anend-to-end framework that provides a technical solution to theabove-described problems in the art. For example, as compared toexisting ECG analysis model approaches, the present application mayextract features from multiple perspectives simultaneously, such as bythe parallel arrangement of the extraction modules 102, 103 and 104 withrespect to the reception of ECG signals where such perspectives are, forexample, the intra-HB features and inter-HB features described above.

In real-world diagnosis, a doctor or cardiologist needs to considermulti-perspective, heterogeneous and even hierarchical structurefeatures to get a comprehensive conclusion. The present applicationtechnically solves such need by merging features from multiple inputs indifferent forms.

Another advantage is that, the proposed system would help researchersand doctors better understand the correlation among ECG signal and theanalysis results such as diagnosis by for example the application ofattention to the modules 102, 103 and 104. Moreover, the proposedframework, enhanced technical ease is obtained by to extend thearchitecture by applying an optional dependence network based onexisting cases, such as by the attention add-on for different ones ofthe extraction modules 102, 103 and 104.

The techniques described above, can be implemented as computer softwareusing computer-readable instructions and physically stored in one ormore computer-readable media or by a specifically configured one or morehardware processors. For example, FIG. 4 shows a computer system 400suitable for implementing certain embodiments of the disclosed subjectmatter.

The computer software can be coded using any suitable machine code orcomputer language, that may be subject to assembly, compilation,linking, or like mechanisms to create code comprising instructions thatcan be executed directly, or through interpretation, micro-codeexecution, and the like, by computer central processing units (CPUs),Graphics Processing Units (GPUs), and the like.

The instructions can be executed on various types of computers orcomponents thereof, including, for example, personal computers, tabletcomputers, servers, smartphones, gaming devices, internet of thingsdevices, and the like.

The components shown in FIG. 4 for computer system 400 are exemplary innature and are not intended to suggest any limitation as to the scope ofuse or functionality of the computer software implementing embodimentsof the present disclosure. Neither should the configuration ofcomponents be interpreted as having any dependency or requirementrelating to any one or combination of components illustrated in theexemplary embodiment of a computer system 400.

Computer system 400 may include certain human interface input devices.Such a human interface input device may be responsive to input by one ormore human users through, for example, tactile input (such as:keystrokes, swipes, data glove movements), audio input (such as: voice,clapping), visual input (such as: gestures), olfactory input (notdepicted). The human interface devices can also be used to capturecertain media not necessarily directly related to conscious input by ahuman, such as audio (such as: speech, music, ambient sound), images(such as: scanned images, photographic images obtain from a still imagecamera), video (such as two-dimensional video, three-dimensional videoincluding stereoscopic video).

Input human interface devices may include one or more of (only one ofeach depicted): keyboard 401, mouse 402, trackpad 403, touch screen 410,joystick 405, microphone 406, scanner 408, camera 407.

Computer system 400 may also include certain human interface outputdevices. Such human interface output devices may be stimulating thesenses of one or more human users through, for example, tactile output,sound, light, and smell/taste. Such human interface output devices mayinclude tactile output devices (for example tactile feedback by thetouch-screen 410, or joystick 405, but there can also be tactilefeedback devices that do not serve as input devices), audio outputdevices (such as: speakers 409, headphones (not depicted)), visualoutput devices (such as screens 410 to include CRT screens, LCD screens,plasma screens, OLED screens, each with or without touch-screen inputcapability, each with or without tactile feedback capability—some ofwhich may be capable to output two dimensional visual output or morethan three dimensional output through means such as stereographicoutput; virtual-reality glasses (not depicted), holographic displays andsmoke tanks (not depicted)), and printers (not depicted).

Computer system 400 can also include human accessible storage devicesand their associated media such as optical media including CD/DVD ROM/RW420 with CD/DVD or the like media 421, thumb-drive 422, removable harddrive or solid state drive 423, legacy magnetic media such as tape andfloppy disc (not depicted), specialized ROM/ASIC/PLD based devices suchas security dongles (not depicted), and the like.

Those skilled in the art should also understand that term “computerreadable media” as used in connection with the presently disclosedsubject matter does not encompass transmission media, carrier waves, orother transitory signals.

Computer system 400 can also include interface to one or morecommunication networks. Networks can for example be wireless, wireline,optical. Networks can further be local, wide-area, metropolitan,vehicular and industrial, real-time, delay-tolerant, and so on. Examplesof networks include local area networks such as Ethernet, wireless LANs,cellular networks to include GSM, 3G, 4G, 5G, LTE and the like, TVwireline or wireless wide area digital networks to include cable TV,satellite TV, and terrestrial broadcast TV, vehicular and industrial toinclude CANBus, and so forth. Certain networks commonly require externalnetwork interface adapters that attached to certain general-purpose dataports or peripheral buses (449) (such as, for example USB ports of thecomputer system 400; others are commonly integrated into the core of thecomputer system 400 by attachment to a system bus as described below(for example Ethernet interface into a PC computer system or cellularnetwork interface into a smartphone computer system). Using any of thesenetworks, computer system 400 can communicate with other entities. Suchcommunication can be uni-directional, receive only (for example,broadcast TV), uni-directional send-only (for example CANbusto certainCANbus devices), or bi-directional, for example to other computersystems using local or wide area digital networks. Certain protocols andprotocol stacks can be used on each of those networks and networkinterfaces as described above.

Aforementioned human interface devices, human-accessible storagedevices, and network interfaces can be attached to a core 440 of thecomputer system 400.

The core 440 can include one or more Central Processing Units (CPU) 441,Graphics Processing Units (GPU) 442, specialized programmable processingunits in the form of Field Programmable Gate Areas (FPGA) 443, hardwareaccelerators for certain tasks 444, and so forth. These devices, alongwith Read-only memory (ROM) 445, Random-access memory 446, internal massstorage such as internal non-user accessible hard drives, SSDs, and thelike 447, may be connected through a system bus 448. In some computersystems, the system bus 448 can be accessible in the form of one or morephysical plugs to enable extensions by additional CPUs, GPU, and thelike. The peripheral devices can be attached either directly to thecore's system bus 448, or through a peripheral bus 449. Architecturesfor a peripheral bus include PCI, USB, and the like.

CPUs 441, GPUs 442, FPGAs 443, and accelerators 444 can execute certaininstructions that, in combination, can make up the aforementionedcomputer code. That computer code can be stored in ROM 445 or RAM 446.Transitional data can be also be stored in RAM 446, whereas permanentdata can be stored for example, in the internal mass storage 447. Faststorage and retrieve to any of the memory devices can be enabled throughthe use of cache memory, that can be closely associated with one or moreCPU 441, GPU 442, mass storage 447, ROM 445, RAM 446, and the like.

The computer readable media can have computer code thereon forperforming various computer-implemented operations. The media andcomputer code can be those specially designed and constructed for thepurposes of the present disclosure, or they can be of the kind wellknown and available to those having skill in the computer software arts.

As an example and not by way of limitation, the computer system havingarchitecture 400, and specifically the core 440 can providefunctionality as a result of processor(s) (including CPUs, GPUs, FPGA,accelerators, and the like) executing software embodied in one or moretangible, computer-readable media. Such computer-readable media can bemedia associated with user-accessible mass storage as introduced above,as well as certain storage of the core 440 that are of non-transitorynature, such as core-internal mass storage 447 or ROM 445. The softwareimplementing various embodiments of the present disclosure can be storedin such devices and executed by core 440. A computer-readable medium caninclude one or more memory devices or chips, according to particularneeds. The software can cause the core 440 and specifically theprocessors therein (including CPU, GPU, FPGA, and the like) to executeparticular processes or particular parts of particular processesdescribed herein, including defining data structures stored in RAM 446and modifying such data structures according to the processes defined bythe software. In addition or as an alternative, the computer system canprovide functionality as a result of logic hardwired or otherwiseembodied in a circuit (for example: accelerator 444), which can operatein place of or together with software to execute particular processes orparticular parts of particular processes described herein. Reference tosoftware can encompass logic, and vice versa, where appropriate.Reference to a computer-readable media can encompass a circuit (such asan integrated circuit (IC)) storing software for execution, a circuitembodying logic for execution, or both, where appropriate. The presentdisclosure encompasses any suitable combination of hardware andsoftware.

Besides the mentioned design and procedure of the proposed framework,there are several alternatives:

The extraction module may use a combination of several algorithms andstructures, for instance, RNN with CNN, RNN with a support vectormachine (SVM), etc. Since the flexibility of definition of “feature” inmachine learning, the exact implementation of extraction modules mayvary as would be recognized from this application.

Further, the perspectives of feature extraction are flexible andalthough there is described use of intra-HB and inter-HB categoriesabove, alternatives, may use: HB, QRS wave, T wave, etc. as hierarchicalcategories for feature extraction.

Moreover, the attention add-on are also flexible in that the attentionmay or may not be used for certain modules and also that a same ordifferent attentions may be applied to different modules depending onthe requirement and purpose of feature extraction.

For feature extraction modules, similar models could share a subset ofparameters to account the similarity among inputs.

Presently, the framework is designed as an end-to-end procedure that thewhole framework will be optimized and altered simultaneously accordingto exemplary embodiments, and an alternative may be a step-by-steptraining procedure, in which the extraction modules can be trainedseparately, for instance, using encoder and decoder structure, accordingto other embodiments.

This approach can be extended to other applications which have multiplesources of inputs.

Further, there may be, based on the extraction modules and analysistasks selected to apply with, optional feedback mechanisms added from anoutput to the feature extraction modules 102, 103 and 104. For instance,in an RNN model for multi-symptom diagnosis, according to exemplaryembodiments, such feedback mechanisms may further account fordependencies among symptoms, and a feedback link 109, as shown in thesystem 500 of FIG. 5, can be added from diagnosed symptoms to featureextraction modules 102, 103 and 104, in to inform one or more of theextraction modules 102, 103 and 104 and one or more of their attentionmechanisms how and where to concentrate or focus in subsequent steps.

While this disclosure has described several exemplary embodiments, thereare alterations, permutations, and various substitute equivalents, whichfall within the scope of the disclosure. It will thus be appreciatedthat those skilled in the art will be able to devise numerous systemsand methods which, although not explicitly shown or described herein,embody the principles of the disclosure and are thus within the spiritand scope thereof.

What is claimed is:
 1. An apparatus comprising: at least one memoryconfigured to store computer program code; at least one hardwareprocessor configured to access said computer program code and operate asinstructed by said computer program code, said computer program codeincluding: intra-heartbeat (HB) extraction code configured to cause theat least one hardware processor to extract intra-HB features fromelectrocardiography (ECG) signals; inter-HB extraction code configuredto cause the at least one hardware processor to extract inter-HBfeatures from the ECG signals; attention mechanism code configured tocause the at least one hardware processor to control the extraction ofthe inter-HB and intra-HB features based on at least one attentionmechanism; and ECG analysis code configured to cause the at least onehardware processor to obtain and statistically process the intra-HBfeatures and the inter-HB features, wherein the ECG analysis code isfurther configured to cause the at least one hardware processor tooutput at least an outlier alarm based on a result of statisticallyprocessing the intra-HB features and the inter-HB features, and whereinthe intra-HB extraction code is further configured to cause the at leastone hardware processor to extract the intra-HB features in parallel withextraction of the inter-HB features.
 2. The apparatus according to claim1, wherein the computer program code further includes extraction poolcode configured to cause the at least one hardware processor to extractat least one extraction model from an extraction pool and apply the atleast one extraction model to extraction of at least one of the intra-HBfeatures and the inter-HB features by a corresponding one of theintra-HB extraction code and the inter-HB extraction code.
 3. Theapparatus according to claim 1, wherein the computer program codefurther includes second inter-HB extraction code configured to cause theat least one processor to extract second inter-HB features from the ECGsignals in parallel with both of the extraction of the intra-HB featuresand the extraction of the inter-HB features.
 4. The apparatus accordingto claim 3, wherein the at least one attention mechanism code isconfigured to cause the at least one hardware processor to control theintra-HB extraction based on the at least one attention mechanism, andwherein the computer program code further includes: second attentionmechanism code configured to cause the at least one hardware processorto control the inter-HB extraction based on a second attentionmechanism; and third attention mechanism code configured to cause the atleast one hardware processor to control the second inter-HB extractionbased on a third attention mechanism.
 5. The apparatus according toclaim 1, wherein the computer program code further includes taskspecific pool code configured to cause the at least one hardwareprocessor to extract at least one task specific model from a taskspecific pool and apply the at least one task specific model tostatistically process the intra-HB features and the inter-HB features.6. The apparatus according to claim 5, wherein the ECG analysis code isfurther configured to cause the at least one hardware processor tooutput further at least one of a classification result and a predicteddiagnosis based on the result of statistically processing the intra-HBfeatures and the inter-HB features.
 7. The apparatus according to claim6, wherein statistically processing the intra-HB features and theinter-HB features comprises at least one of batch normalization andinstance normalization based on the at least one task specific model. 8.The apparatus according to claim 7, wherein computer program codefurther includes feedback link code configured to cause the at least onehardware processor to feedback an output of the ECG analysis code to theat least one attention mechanism, and wherein the at least one attentionmechanism code is configured to cause the at least one hardwareprocessor to update the attention mechanism based on the output.
 9. Amethod performed by at least one computer processor comprising:extracting intra-HB features from electrocardiography (ECG) signals;extracting, inter-HB features from the ECG signals; controlling at leastone of the intra-HB extraction and inter-HB extraction based on at leastone attention mechanism; obtaining and statistically processing theintra-HB features and the inter-HB features; and outputting at least anoutlier alarm based on a result of statistically processing the intra-HBfeatures and the inter-HB features, wherein extracting the intra-HBfeatures is in parallel with extraction of the inter-HB features. 10.The method according to claim 9, further comprising: extracting at leastone extraction model from an extraction pool and applying the at leastone extraction model to extraction of at least one of the intra-HBfeatures and the inter-HB features.
 11. The method according to claim 9,further comprising: extracting second inter-HB features from the ECGsignals in parallel with both of the extraction of the intra-HB featuresand the extraction of the inter-HB.
 12. The method according to claim11, further comprising: controlling the intra-HB extraction based on theat least one attention mechanism; controlling the inter-HB extractionbased a second attention mechanism; and controlling the second inter-HBextraction based on a third attention mechanism.
 13. The methodaccording to claim 9, further comprising: extracting at least one taskspecific model from a task specific pool; and applying the at least onetask specific model to statistically process the intra-HB features andthe inter-HB features.
 14. The method according to claim 13, furthercomprising: outputting at least one of a classification result and apredicted diagnosis based on the result of statistically processing theintra-HB features and the inter-HB features.
 15. The method according toclaim 14, wherein statistically processing the intra-HB features and theinter-HB features comprises at least one of batch normalization andinstance normalization based on the at least one task specific model.16. A non-transitory computer readable medium storing a program causinga computer to execute a process, the process comprising: extractingintra-HB features from electrocardiography (ECG) signals; extractinginter-HB features from the ECG signals; controlling at least one of theintra-HB extraction and inter-HB extraction based on at least oneattention mechanism; obtaining and statistically processing the intra-HBfeatures and the inter-HB features; and outputting at least an outlieralarm based on a result of statistically processing the intra-HBfeatures and the inter-HB features, wherein extracting the intra-HBfeatures is in parallel with extraction of the inter-HB features.